import React from 'react';
import { observer } from 'mobx-react-lite';
import { loadingService } from '.';

export const Loading = observer(() => {
  const isLoading = !!loadingService.state.loadings.length;

  return (
    <div className="loading-modal">
      {isLoading && 'loading'}
    </div>
  );
});
